package com.yummy.service.impl;

import com.yummy.entity.Store;
import com.yummy.mapper.StoreMapper;
import com.yummy.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yinbo
 */
@Service
public class StoreServiceImpl implements StoreService {
	@Autowired
	StoreMapper storeMapper;

	@Override
	public boolean register(Store store) {
		return storeMapper.insertStore(store)>0;
	}

	@Override
	public List<Store> queryAll() {
		List<Store> stores = storeMapper.selectAll();
		return stores;
	}
}
